public class Lesson02类型转换 {
    public static void main(String[] args) {
        int i = 128;
        System.out.println(i);
        byte b = (byte)i;//内存溢出
        System.out.println(b);
        double d = i;
        System.out.println(d);
        //byte,short,char - int - long - float - double
        //强制转换 高容量-低容量
        //自动转换 低容量-高容量
        System.out.println((int)23.7);
        System.out.println((int)-45.9f);
        char c ='a';
        int i1 = c+1;
        System.out.println(i1);
        System.out.println((char)i1);
        int money = 10_0000_0000;
        int years = 20;
        int total1 = money * years;//计算时候溢出
        System.out.println(total1);
        long total2 = money * years;
        System.out.println(total2);
        long total3 = money * ((long)years);
        System.out.println(total3);
    }
}
